home *** CD-ROM | disk | FTP | other *** search
/ Aminet 1 (Walnut Creek) / Aminet - June 1993 [Walnut Creek].iso / aminet / util / pack / xpk25dev.lha / include / libraries / xpksub.h < prev    next >
C/C++ Source or Header  |  1992-07-20  |  4KB  |  112 lines

  1. /*
  2. **    $Filename: xpknuke.h $
  3. **    $Release: 0.9 $
  4. **
  5. **    (C) Copyright 1991 U. Dominik Mueller & Christian Schneider
  6. **        All Rights Reserved
  7. */
  8.  
  9. #ifndef LIBRARIES_XPKSUB_H
  10. #define LIBRARIES_XPKSUB_H
  11.  
  12. #ifndef LIBRARIES_XPK_H
  13. #include <libraries/xpk.h>
  14. #endif
  15.  
  16. #ifndef EXEC_TYPES_H
  17. #include <exec/types.h>
  18. #endif
  19.  
  20.  
  21.  
  22. /**************************************************************************
  23.  *
  24.  *                     The XpkInfo structure
  25.  *
  26.  */
  27.  
  28.  
  29. /* Sublibs return this structure to xpkmaster when asked nicely
  30.  * This is version 1 of XpkInfo.  It's not #define'd because we don't want
  31.  * it changing automatically with recompiles - you've got to actually update
  32.  * your code when it changes. */
  33. typedef struct XpkInfo {
  34.     UWORD   XpkInfoVersion  ; /* Version number of this structure        */
  35.     UWORD   LibVersion      ; /* The version of this sublibrary          */
  36.     UWORD   MasterVersion   ; /* The required master lib version         */
  37.     UWORD   ModesVersion    ; /* Version number of mode descriptors      */
  38.     STRPTR  Name            ; /* Brief name of the packer, 20 char max   */
  39.     STRPTR  LongName        ; /* Full name of the packer   30 char max   */
  40.     STRPTR  Description     ; /* Short packer desc., 70 char max         */
  41.     LONG    ID              ; /* ID the packer goes by (XPK format)      */
  42.     LONG    Flags           ; /* Defined below                           */
  43.     LONG    MaxPkInChunk    ; /* Max input chunk size for packing        */
  44.     LONG    MinPkInChunk    ; /* Min input chunk size for packing        */
  45.     LONG    DefPkInChunk    ; /* Default packing chunk size              */
  46.     STRPTR  PackMsg         ; /* Packing message, present tense          */
  47.     STRPTR  UnpackMsg       ; /* Unpacking message, present tense        */
  48.     STRPTR  PackedMsg       ; /* Packing message, past tense             */
  49.     STRPTR  UnpackedMsg     ; /* Unpacking message, past tense           */
  50.     UWORD   DefMode         ; /* Default mode number                     */
  51.     UWORD   Pad             ; /* for future use                          */
  52.     struct XpkMode *ModeDesc; /* List of individual descriptors          */
  53.     ULONG   Reserved[6]     ; /* Future expansion - set to zero          */
  54.  
  55. /*    LABEL    xi_SIZEOF */
  56. } XINFO;
  57.  
  58. /* defines for Flags: see xpk.h, XPKIF_xxxxx */
  59.  
  60. /**************************************************************************
  61.  *
  62.  *                     The XpkSubParams structure
  63.  *
  64.  */
  65.  
  66. typedef struct XpkSubParams {
  67.     APTR    InBuf        ; /* The input data               */
  68.     LONG    InLen        ; /* The number of bytes to pack  */
  69.     APTR    OutBuf        ; /* The output buffer            */
  70.     LONG    OutBufLen    ; /* The length of the output buf */
  71.     LONG    OutLen        ; /* Number of bytes written      */
  72.     LONG    Flags        ; /* Flags for master/sub comm.   */
  73.     LONG    Number        ; /* The number of this chunk     */
  74.     LONG    Mode        ; /* The packing mode to use      */
  75.     APTR    Password    ; /* The password to use          */
  76.     LONG    Arg[4]        ; /* Reserved; don't use          */
  77.     LONG    Sub[4]        ; /* Sublib private data          */
  78. } XPARAMS;
  79.  
  80. #define XSF_STEPDOWN   1  /* May reduce pack eff. to save mem   */
  81. #define XSF_PREVCHUNK  2  /* Previous chunk available on unpack */
  82.  
  83.  
  84. #ifndef NO_SUB_PRAGMAS
  85.  
  86. XINFO * __saveds XpksPackerInfo (   void    );
  87. long    __saveds XpksPackChunk  ( XPARAMS * );
  88. void    __saveds XpksPackFree   ( XPARAMS * );
  89. long    __saveds XpksPackReset  ( XPARAMS * );
  90. long    __saveds XpksUnpackChunk( XPARAMS * );
  91. void    __saveds XpksUnpackFree ( XPARAMS * );
  92.  
  93. #pragma libcall XpkSubBase XpksPackerInfo  1E   0
  94. #pragma libcall XpkSubBase XpksPackChunk   24 801
  95. #pragma libcall XpkSubBase XpksPackFree    2A 801
  96. #pragma libcall XpkSubBase XpksPackReset   30 801
  97. #pragma libcall XpkSubBase XpksUnpackChunk 36 801
  98. #pragma libcall XpkSubBase XpksUnpackFree  3C 801
  99.  
  100. #else
  101.  
  102. XINFO * __saveds __asm XpksPackerInfo (     void      );
  103. long    __saveds __asm XpksPackChunk  ( _a0 XPARAMS * );
  104. void    __saveds __asm XpksPackFree   ( _a0 XPARAMS * );
  105. long    __saveds __asm XpksPackReset  ( _a0 XPARAMS * );
  106. long    __saveds __asm XpksUnpackChunk( _a0 XPARAMS * );
  107. void    __saveds __asm XpksUnpackFree ( _a0 XPARAMS * );
  108.  
  109. #endif
  110.  
  111. #endif /* XPKSUB_H */
  112.